#ifndef INSTRUCTIONS_H_
#define INSTRUCTIONS_H_

#include <string>

//Include sstream for display func - Archie
#include <sstream>
#include <vector>

using namespace std;


struct Instructions {
public:
	// constructors - Archie
	Instructions () 
	{
	}

	Instructions (string IntructionsText) 
	{
		istringstream TextParser(IntructionsText); //Make stringstream to parse
		string Instruction; //temporary string variable
		do //read until find # symbol
		{
			std::getline(TextParser, Instruction); //get the line and push the instruction
			InstructionPhases.push_back(Instruction);
		} while(Instruction.find('#')==string::npos);
	}

	// utility functions - Archie
	string display() 
	{
		stringstream tempoutput; //make temporary stringstream to return the concatted string

		for(vector<string>::iterator it = InstructionPhases.begin(); it != InstructionPhases.end(); ++it) 
		{
			tempoutput << *it <<"\n";
		}

		return tempoutput.str();
	}

private:
	//constants  

	// private data
	vector<string> InstructionPhases; //vector to put the instructions order
};


#endif //INSTRUCTIONS_H_
